﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class test : MonoBehaviour
{
    Rigidbody2D r;
    // Start is called before the first frame update
    void Start()
    {
        r = GetComponent<Rigidbody2D>();
        r.freezeRotation = false;
    }

    // Update is called once per frame
    void Update()
    {
        float h = 0;
        h = Input.GetAxis("Horizontal");
        //Debug.Log(h);
        r.AddTorque(h * 200);

    }
}
